import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { SingerDetailComponent } from './singer-detail/singer-detail.component';
import { SingerResolveService } from './singer-resolve.service';

const routes: Routes = [
  {
    path: 'singer/:id',
    component: SingerDetailComponent,
    data: { title: '歌手详情' },
    resolve: { singerDetail: SingerResolveService }
  }
];

@NgModule({
  imports: [RouterModule.forChild(routes)],
  exports: [RouterModule],
  providers: [SingerResolveService]
})
export class SingerRoutingModule { }
